window.phoenix&&(window.phoenix.buildInfo||(window.phoenix.buildInfo=[]),-1===window.phoenix.buildInfo.findIndex((e=>"Phoenix-experience"===e.MFE))&&window.phoenix.buildInfo.push({MFE:"Phoenix-experience",VERSION:"rc-phoenix-experience-1.1.26105.1370789671-5a319f99-4-gb151444",LASTCOMMITDATETIME:"2024-07-12T10:57:26+00:00"})) /*! * * ============= BUILD INFO ============= * MFE: Phoenix-experience * chunkName: service-clientlibs/recaptcha/recaptcha * VERSION: rc-phoenix-experience-1.1.26105.1370789671-5a319f99-4-gb151444 * BRANCH: HEAD * COMMITHASH: b15144446b0aeb869603529fd56baec1576b10c9 * LASTCOMMITDATETIME: 2024-07-12T10:57:26+00:00 * ============= If you're reading this, why not come work with us? https://www.t-mobile.com/careers ============= */,function(){"use strict";class e{configName;headers;options;constructor(){this.configName=Symbol.for("Recaptcha Service Config"),this.headers={"Content-Type":"application/json"},this.options={action:"submit"}}}const i={appName:"phoenix-experience",className:"RecaptchaService"};class c{name;config;constructor(){this.name=Symbol.for("Recaptcha Service");const e=document.getElementById("content-root"),i=new MutationObserver((()=>{const e=document.querySelectorAll("[data-xpr-modal]");for(let c=0;c{"undefined"==typeof grecaptcha&&c(),grecaptcha.ready((async()=>{try{const c=await grecaptcha.execute(e,{...this.config?.options});i(c)}catch(e){c()}}))}))}async verifyRecaptcha(e,c,t){const o="error";try{const i=new URLSearchParams({token:e});for(let e=0;e<3;e++){const n=await fetch(`${c}?`+i.toString(),{method:"GET",cache:"no-cache",headers:this.config?.headers});if(n.ok){const e=await n.json();if(o in e&&!t)throw new Error("Recaptcha Verification Failed");if("success"in e){const i=e?.success;if(!i&&!(o in e))throw console.log("Token Verification Failed"),window.phoenix.log.error("Token Verification Failed",{appName:"",className:""}),new Error("Token Verification Failed");window.phoenix.bus.publish("RECAPTCHA","RECAPTCHA_VERIFY_SUCCESS");break}}else 2==e&&(window.phoenix.log.debug("Token Verification Failed",{appName:"recaptcha",className:this.name.toString()}),this.handleServiceError())}}catch(e){window.phoenix.log.error("Error occured during recaptcha service",i,{exception:e}),this.handleServiceError()}}handleRecaptchaError(){window.phoenix.bus.publish("RECAPTCHA","RECAPTCHA_EXECUTION_FAILURE")}handleServiceError(){window.phoenix.bus.publish("RECAPTCHA","RECAPTCHA_VERIFY_FAILURE")}}const t={appName:"phoenix-experience",className:"RecaptchaService"};try{window.phoenix.log.debug("Starting Recaptcha Service",t);(new c).start(new e),window.phoenix.log.debug("Finished starting Recaptcha Service",t)}catch(e){window.phoenix.log.error("Error starting Recaptcha Service",t,{exception:e})}}();